@extends('admin/layout')
@section('content')

    
	    <div class="content-wrapper">

        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                用户管理
                <small>添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 后台主页</a></li>
                <li><a href="#">用户管理</a></li>
                <li class="active">添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="con
        tent">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加用户</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->

                        
							


                        <form role="form" action = "{{url('/admin/user/insert')}}" method = "post">
                           	{{ csrf_field() }}
                            <div class="box-body">
							@if(count($errors)>0)
	                            <div class="alert alert-danger alert-dismissable">
				                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
				                    <h4><i class="icon fa fa-ban"></i> 警告!</h4>
				                    	<ul>
											@foreach($errors->all() as $error)
											<li>
												{{$error}}
											</li>
											@endforeach
										</ul>
			                  	</div>
							@endif	
									
                                <div class="form-group">
                                    <label for="exampleInputEmail1">用户名</label>
                                    <input type="text" class="form-control" name = 'username' id="exampleInputEmail1"
                                           placeholder="请输入6-18位的用户名" value = "{{  old('username')  }}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">密码</label>
                                    <input type="password" class="form-control" name = 'password' id="exampleInputPassword1"
                                           placeholder="请输入密码">
                                </div>
                                 <div class="form-group">
                                    <label for="exampleInputPassword1">确认密码</label>
                                    <input type="password" class="form-control" name = 'repassword' id="exampleInputPassword1"
                                           placeholder="请再次输入密码">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">邮箱</label>
                                    <input type="text" class="form-control" name = 'email' id="exampleInputPassword1"
                                           placeholder="请输入邮箱" value = "{{  old('email')  }}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">电话</label>
                                    <input type="text" class="form-control" name = 'phone' id="exampleInputPassword1"
                                           placeholder="请输入电话" value = "{{  old('phone')  }}">
                                </div>
                                
                                
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">添加</button>
                            </div>
                        </form>


                    </div><!-- /.box -->

                            </div><!-- /input-group -->
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->

                </div><!--/.col (left) -->
          
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->


@endsection